include ./makefile.inc


TARGETS=libthread.a libsocket.a

THREAD_SRCS=$(wildcard $(DIR_PROJECT)/thread/*.cpp) $(wildcard $(DIR_PROJECT)/tools/*.cpp)
THREAD_OBJS=$(patsubst %.cpp,%.o,$(THREAD_SRCS)) 

SOCKET_SRCS=$(wildcard $(DIR_PROJECT)/socket/*.cpp) $(wildcard $(DIR_PROJECT)/buffer/*.cpp) \
			$(wildcard $(DIR_PROJECT)/alloc/*.cpp)  $(wildcard $(DIR_PROJECT)/tools/*.cpp)
SOCKET_OBJS=$(patsubst %.cpp,%.o,$(SOCKET_SRCS))

all: $(TARGETS) 

libthread.a: $(THREAD_OBJS)
	$(AR) $@ $^

libsocket.a: $(SOCKET_OBJS)
	$(AR) $@ $^


clean:
	$(RM) $(THREAD_OBJS) $(SOCKET_OBJS) $(TARGETS)


